function Mat = AiryWave(Input)
%规则波计算
WaterDepth = Input.WaterDepth;
LocalDepth = Input.LocalDepth;
PhaseAng   = Input.PhaseAng*pi/180;
Time       = Input.Time;

Dis_X      = Input.Dis_X;
Dis_Y      = Input.Dis_Y;
WaveDir    = Input.WaveDir*pi/180;

T          = Input.T;
WaveLength = GetWaveLength(WaterDepth,T);
K = 2*pi/WaveLength;

Omega      = 2*pi/T;
Amplitude  = Input.Amplitude;

%参数计算
Theta = -Omega*Time + (Dis_X*cos(WaveDir) + Dis_Y*sin(WaveDir))*K + PhaseAng;%PhaseAng初始偏移设为0就好

A1 = Omega*Amplitude;
A2 = A1*Omega;

C1 = cosh(K*(LocalDepth + WaterDepth))/sinh(K*WaterDepth);
C2 = sinh(K*(LocalDepth + WaterDepth))/sinh(K*WaterDepth);

Vel_X = A1*cos(WaveDir)*C1*cos(Theta);
Vel_Y = A1*sin(WaveDir)*C1*cos(Theta);
Vel_Z = A1*C2*sin(Theta);

Acc_X =  A2*cos(WaveDir)*C1*sin(Theta);
Acc_Y =  A2*sin(WaveDir)*C1*sin(Theta);
Acc_Z = -A2*C2*cos(Theta);
WaveVel = [Vel_X, Vel_Y, Vel_Z];
WaveAcc = [Acc_X, Acc_Y, Acc_Z];
Mat     = [WaveVel, WaveAcc];
end